package com.hc.model.code02.test1;

/**
 * @version v1.0
 * @ClassName: Singleton
 * @Description:
 *      成员变量创建类方式（饿汉式）
 *          缺点：占用资源
 * @Author: HC
 */
public class Singleton {

    // 私有化
    private Singleton() {}

    // 创建对象
    private final static Singleton instances = new Singleton();

    public static Singleton getInstances() {
        return instances;
    }
}
